home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / NEWSOFT / AUGUST / MESSENGER / !Messenger / Resources / !NewsFind / ExtLaunch < prev    next >
Text File  |  1997-05-12  |  5KB  |  164 lines

  1. How to launch NewsFind from another application
  2. ===============================================
  3.  
  4. NewsFind can be called from another application. In this mode it will
  5. not install an icon on the icon bar and will exit when it has finished
  6. one search. You can choose whether to pass a search specification or to
  7. leave it to the user to enter the details in NewsFind's dialogue box.
  8. Either way it multitasks, so you should launch it in the following way:
  9.  
  10.   Call Wimp_StartTask to run it with a Control file as a parameter
  11.   and store the task handle returned by the SWI.
  12.   
  13.   Wait until you receive Message_TaskCloseDown (&400C3) from the
  14.   task, then read the results files.
  15.  
  16. The Control file should be the first parameter in the command used to
  17. launch NewsFind eg:
  18.  
  19.   Run <NewsFind$Dir>.!Run <NewsFind$WorkDir>.NewsFind.Control
  20.  
  21. Note that if you use <NewsFind$WorkDir> at this point, its NewsFind
  22. subdirectory may not have been created yet, so you should create it first
  23. as a precaution with a line such as:
  24.  
  25.   _swix(OS_File, _INR(0,1)|_IN(4), 8, "<NewsFind$WorkDir>.NewsFind", 0);
  26.  
  27. NewsFind will automatically do this for any other files it may want to
  28. store there.
  29.  
  30. There are two results files you can specify in the Control file. I
  31. recommend that you specify <NewsFind$WorkDir>.NewsFind.Result and
  32. <NewsFind$WorkDir>.NewsFind.Found. You should ensure that old copies of
  33. these files do not exist before starting a search, otherwise your
  34. application could read invalid results from an earlier search if NewsFind
  35. aborts. The first is the Result file, which will contain a single line
  36. showing the number of matching messages found in textual form. The second
  37. is the Found description file, which will contain details of each matching
  38. file in the form of one line per group, starting with the group name,
  39. followed by a space-separated (including a trailing space for each line)
  40. list of all matching articles in the group. All searched groups will be
  41. listed, even if they contain no matches. For example, a typical search of
  42. comp.sys.acorn.* I performed earlier produced this:
  43.  
  44. comp.sys.acorn.announce 
  45. comp.sys.acorn.games 975 976 1111 1147 1148 1154 
  46. comp.sys.acorn.hardware 
  47. comp.sys.acorn.misc 4244 4245 4458 4475 4576 4681 
  48. comp.sys.acorn.programmer 1304 1305 1306 1307 1336 1337 1340 1359 1409 1410 1411 1412 1413 1446 1447 1490 1491 1492 1493 1499 1562 1563 
  49.  
  50. Control file format
  51. ___________________
  52.  
  53. The Control file takes the form of a Messages file with the following
  54. tags:
  55.  
  56. User
  57. ----
  58. User to use for performing the search.
  59. Optional, defaulting to root.
  60.  
  61. Password
  62. --------
  63. Password for above user.
  64. Optional, defaulting to no password.
  65.  
  66. Log
  67. ---
  68. Number indicating type of log. 8=none, 9=appended to existing log,
  69. 10=overwrites any existing log.
  70. Optional, defaulting to 9.
  71.  
  72. LogFile
  73. -------
  74. File to write log to.
  75. Optional, defaulting to <NewsFind$WorkDir>.NewsFind.Log
  76.  
  77. ResultFile
  78. ----------
  79. Result file, as described above.
  80. Optional, defaulting to none.
  81.  
  82. FoundFile
  83. ---------
  84. Found file, as described above.
  85. Optional, defaulting to none.
  86.  
  87. Copy
  88. ----
  89. Whether to copy matching articles to a folder (see FoundFolder).
  90. Y or N.
  91. Optional, defaulting to Y.
  92.  
  93. FoundFolder
  94. -----------
  95. A Newsbase folder to copy any matching articles to (see Copy).
  96. Optional, defaulting to Folder.NewsFind.
  97.  
  98. XPos
  99. ----
  100. YPos
  101. ----
  102. OS coords for where to position top left of search dialogue box if used.
  103. If both are 0, the position defined in the Res file is used.
  104. Optional, defaulting to 0.
  105.  
  106. Status
  107. ------
  108. Whether to open Status window.
  109. Y or N.
  110. Optional, defaulting to Y.
  111.  
  112. StatusX
  113. -------
  114. StatusY
  115. -------
  116. Position of Status window (see XPos, YPos).
  117.  
  118. Expression
  119. ----------
  120. Search expression as defined in !Help file.
  121. If present, the Search dialogue will not be used.
  122. Optional, defaulting to use dialogue box instead.
  123.  
  124. Group
  125. -----
  126. Group specifier as defined in !Help file.
  127. Compulsory if Expression is present, otherwise optional.
  128.  
  129. Scope
  130. -----
  131. Which part of each article to search
  132.     0 = Subject
  133.     1 = From
  134.     2 = Date
  135.     3 = MessageID
  136.     4 = References
  137.   256 = Whole article
  138.   257 = Body only
  139.   258 = All headers
  140. Compulsory if Expression is present, otherwise optional.
  141.  
  142. Case
  143. ----
  144. Whether search is case-sensitive.
  145. Y or N.
  146. Optional, defaulting to N.
  147.  
  148. Strict
  149. ------
  150. Whether search is a strict line match.
  151. Optional, defaulting to N.
  152.  
  153. Reverse
  154. -------
  155. Whether to search backwards so that newest items are searched first.
  156. Y or N.
  157. Optional, defaulting to N.
  158.  
  159. Delete
  160. ------
  161. Whether to delete matching articles.
  162. Y or N.
  163. Optional, defaulting to N.
  164.